package org.jeecg.modules.scm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.common.aspect.EnableDict;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 云链单表实体类
 * @Author: zzq
 * @Date: 2021-11-04
 * @Version: V1.0
 */
@Data
@TableName("scm_cloud_chain")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "云链单表实体类", description = "scm_cloud_chain")
public class ScmCloudChain implements Serializable, EnableDict {
    private static final long serialVersionUID = 1L;

    /**
     * 数字债权凭证编号
     */
    @Excel(name = "数字债权凭证编号", width = 15)
    @ApiModelProperty(value = "数字债权凭证编号")
    @TableId(type = IdType.ASSIGN_ID)
    private String chainNo;
    /**
     * 持有人客户号
     */
    @Excel(name = "持有人客户号", width = 15)
    @ApiModelProperty(value = "持有人客户号")
    @Dict(dictTable = "scm_cus_info", dicText = "cus_name", dicCode = "cus_no")
    private Integer ownerCusNo;
    /**
     * 凭证金额
     */
    @Excel(name = "凭证金额", width = 15)
    @ApiModelProperty(value = "凭证金额")
    private BigDecimal amount;
    /**
     * 凭证币种
     */
    @Excel(name = "凭证币种", width = 15)
    @ApiModelProperty(value = "凭证币种")
    private Integer currency;
    /**
     * 凭证到期日
     */
    @Excel(name = "凭证到期日", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "凭证到期日")
    private Date dueTime;
    /**
     * 凭证转出日期
     */
    @Excel(name = "凭证转出日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "凭证转出日期")
    private Date transferTime;
    /**
     * 凭证签收日期
     */
    @Excel(name = "凭证签收日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "凭证签收日期")
    private Date signTime;
    /**
     * 区块链加密区
     */
    @Excel(name = "区块链加密区", width = 15)
    @ApiModelProperty(value = "区块链加密区")
    private String blockChain;
    /**
     * 债务人客户号
     */
    @Excel(name = "债务人客户号", width = 15)
    @ApiModelProperty(value = "债务人客户号")
    @Dict(dictTable = "scm_cus_info", dicText = "cus_name", dicCode = "cus_no")
    private Integer debtorCusNo;
    /**
     * 债务人确权日期
     */
    @Excel(name = "债务人确权日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "债务人确权日期")
    private Date debtorAuthRightTime;
    /**
     * 拆分前凭证编号
     */
    @Excel(name = "拆分前凭证编号", width = 15)
    @ApiModelProperty(value = "拆分前凭证编号")
    private String parentChainNo;
    /**
     * 上一手持有人客户号
     */
    @Excel(name = "上一手持有人客户号", width = 15)
    @ApiModelProperty(value = "上一手持有人客户号")
    @Dict(dictTable = "scm_cus_info", dicText = "cus_name", dicCode = "cus_no")
    private Integer preOwnerCusNo;
    /**
     * 原始资产编号(原始云链单编号)
     */
    @Excel(name = "原始资产编号(原始云链单编号)", width = 15)
    @ApiModelProperty(value = "原始资产编号(原始云链单编号)")
    private String originalChainNo;
    /**
     * 原始应收账款ID
     */
    @Excel(name = "原始应收账款ID", width = 15)
    @ApiModelProperty(value = "原始应收账款ID")
    private Integer originalReceivableNo;
    /**
     * 原始交易合同编号
     */
    @Excel(name = "原始交易合同编号", width = 15)
    @ApiModelProperty(value = "原始交易合同编号")
    private String originalContractNo;
    /**
     * 原始交易合同金额（元）
     */
    @Excel(name = "原始交易合同金额（元）", width = 15)
    @ApiModelProperty(value = "原始交易合同金额（元）")
    private BigDecimal originalContractAmount;
    /**
     * 原始交易合同币种
     */
    @Excel(name = "原始交易合同币种", width = 15)
    @ApiModelProperty(value = "原始交易合同币种")
    private Integer originalContractCurrency;
    /**
     * 原始期限(day)
     */
    @Excel(name = "原始期限(day)", width = 15)
    @ApiModelProperty(value = "原始期限(day)")
    private Integer originalMaturity;
    /**
     * 原始交易内容
     */
    @Excel(name = "原始交易内容", width = 15)
    @ApiModelProperty(value = "原始交易内容")
    private String originalTransactionContent;
    /**
     * 1-生效2-失效3-过期4-融资申请中5-转让中6-已转让7-已拆分8-作废
     */
    @Excel(name = "1-生效2-失效3-过期4-融资申请中5-已融资6-转让中7-已转让8-已拆分9-作废", width = 15)
    @ApiModelProperty(value = "1-生效2-失效3-过期4-融资申请中5-已融资6-转让中7-已转让8-已拆分9-作废")
    @Dict(dicCode = "chain_status")
    private Integer stauts;
}
